class B {
    public String name;
    public int age=18;
    public void Func() {
        System.out.print("B");
    }
    public B(String name,int age) {
        this.age=age;
        System.out.println("name "+name+"   age"+age);
    }
}
class D extends B {

    public D() {
        super("ajun",19);
    }
    @Override
    public void Func() {
        System.out.print("D");
    }
}
class C extends B {
    public String name;
    public C(String name) {
        super(name,25);
        this.name=name;
    }
    public void eat() {
        System.out.println(name+" 真在吃饭！");
    }
    public void Func() {
        System.out.println("C");
    }
}
public class Text {
    public static void func(B b){
        b.Func();
    }
    public static void main(String[] args) {
        B b1=new D();
        B b2=new C("za");
        System.out.println();
        func(b1);
        System.out.println(b1.age);
        func(b2);
        System.out.println(b2.age);

    }
}
